package com.baizhi.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("test")
public class restFulController {
    @ResponseBody
    @GetMapping("insert/{name}")
    public String insert(@PathVariable("name") String name){
        return "insert";
    }
    @ResponseBody
    @DeleteMapping("delete")
    public String delete(){
        return "delete";
    }
    @ResponseBody
    @PostMapping("select/{id}")
    public String select(@PathVariable("id") Integer id){
        return "select";
    }
    @ResponseBody
    @PutMapping("selectAll")
    public String selectAll(){
        return "selectAll";
    }
    @ResponseBody
    @PatchMapping("update")
    public String update(){
        return "update";
    }

}
